package com.zycfc.zsf.boot.mybatis.dynamicdatasource;

import java.lang.annotation.*;
import org.springframework.core.annotation.*;
import org.springframework.transaction.annotation.*;

@Target({ ElementType.METHOD, ElementType.TYPE })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Transactional
public @interface TX {
    @AliasFor("transactionManager")
    String value() default "transactionManager";
    
    @AliasFor("value")
    String transactionManager() default "";
    
    Propagation propagation() default Propagation.REQUIRED;
    
    Isolation isolation() default Isolation.DEFAULT;
    
    int timeout() default -1;
    
    boolean readOnly() default false;
    
    Class<? extends Throwable>[] rollbackFor() default {};
    
    String[] rollbackForClassName() default {};
    
    Class<? extends Throwable>[] noRollbackFor() default {};
    
    String[] noRollbackForClassName() default {};
}
